package com.efesco.common;

import java.io.IOException;
import java.io.PrintWriter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class TaskSchedule extends HttpServlet {


	/**
	 * Constructor of the object.
	 */
	public TaskSchedule() {
		super();
	}

	   public void start() { 
			   Timer timer = new Timer(); 
	        timer.schedule(new TaskDeal(), 1000*10,1000*60*60*24); 
	    }
	public void init() throws ServletException {
		 System.out.println("=========start========!");
		start();
		 System.out.println("=========end=======!");
	}

	private static void deleteAnnouceFromList(String annouce_id){
		int len=Announce.V.size()-1;
		while(len>=0){
			AnnounceBean ab=new AnnounceBean();
			ab=(AnnounceBean)Announce.V.get(len);
			if(annouce_id.equals(ab.getINFO_ANNOUNCE_ID())){
				Announce.V.remove(len);
			}
			len--;
		}
	}

	public static void main(String[] args) 
	{ 
		new TaskSchedule().start();
	}
}
